Strings

Strings are sequences of characters. Strings are written as sequences of characters enclosed within doublequotes (<#1339#>;SPMquot;<#1339#>). A doublequote can be written inside a string only by escaping it with a backslash (<#1340#><#1340#>), as in


#scheme1341#

A backslash can be written inside a string only by escaping it with another backslash. Scheme does not specify the effect of a backslash within a string that is not followed by a doublequote or backslash.

A string constant may continue from one line to the next, but the exact contents of such a string are unspecified.

The <#1345#>length<#1345#> of a string is the number of characters that it contains. This number is a non-negative integer that is fixed when the string is created. The <#1346#>valid indexes<#1346#> of a string are the exact non-negative integers less than the length of the string. The first character of a string has index 0, the second has index 1, and so on.

In phrases such as ``the characters of <#1347#>string<#1347#> beginning with index <#1348#>start<#1348#> and ending with index <#1349#>end<#1349#>,'' it is understood that the index <#1350#>start<#1350#> is inclusive and the index <#1351#>end<#1351#> is exclusive. Thus if <#1352#>start<#1352#> and <#1353#>end<#1353#> are the same index, a null substring is referred to, and if <#1354#>start<#1354#> is zero and <#1355#>end<#1355#> is the length of <#1356#>string<#1356#>, then the entire string is referred to.

Some of the procedures that operate on strings ignore the difference between upper and lower case. The versions that ignore case have <#2163#>``<#1357#>-ci<#1357#>''<#2163#> (for ``case insensitive'') embedded in their names.


#entry1358#


#entry1365#


#entry1378#


#entry1383#


#entry1389#


#entry1399#


#entry1416#


#entry1429#


#entry1467#


#entry1482#


#entry1487#


#entry1501#


#entry1507#